import AMapLoader from '@amap/amap-jsapi-loader';
import config from '../../config'

let amapHandle
export const amapinit = (option) => {
    amapHandle = AMapLoader.load(Object.assign({},config.amap,option))
    console.log('amapinit');
    return amapHandle
}

export const getamapHandle = (option) => {
    return amapHandle || amapinit(option)
}